The Need for Correct HTML Syntax


The text-based nature of HTML makes creating web pages a simple task. The ease of this task has meant that many web pages that are published on the World Wide Web are created by use of text editors. Pages designed manually using text editors are often riddled with illegal HTML grammar.
Errors in HTML files not only make your page very hard to read (often HTML tags are displayed along with the main text of the page), but they can also cause formatting errors, such as tables not being drawn, or text being incorrectly aligned.

For example, what is wrong with the following HTML code?
<HTML>
<HEAD>
<TITLE> My Home Page </TITLE>
</HEAD>
<BODY
The content of this page goes here.
</BODY>
</HTML>

This error may not look very serious (once it has actually been located), but failing to close the '>' of the <BODY> tag results in the entire page's content to be treated as attributes of the <BODY> tag, and thus not displayed in the body of the page.
Links are a major error-prone area. How many times have you expectantly clicked a link only to be greeted by the generic web page "404 File Not Found."? What many people fail to realise is that under the UNIX operating system (which the majority of web servers run on), pathnames are case sensitive. Therefore, <a href="Link.html"> is not the same as <a href="link.html">. However, the above link works perfectly on the Macintosh platform, and so many people do not realise their mistake.

Not even the use of web page construction utilities, such as Claris Home Page, and Adobe PageMill ensure that pages are error-free. For example, Microsoft's web pages were built with FrontPage. Almost all of them contain potentially serious errors: table cells are created outside table rows, nested tags are closed in the incorrect order, and ironically, the main FrontPage page contains instances of "valign="center"" and "align="middle"". Intel's main page even has "</body>" and "</html>" placed within a table.

PageInspector checks tags, attributes, attribute data (including local and net-based links) of HTML files for common, and many not-so-common errors to ensure your web pages are perfect!


Return to the Contents Page